package cn.edu360.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

import cn.edu360.pojo.Bike;

@Service
public class BikeServiceImpl implements BikeService {
	
	@Autowired
	private MongoTemplate mongoTemplate;
	
	@Override
	public void save(Bike bike) {
		// 调用具体的业务
		//mongoTemplate.insert(bike,"bikes");
		mongoTemplate.insert(bike);//在Bike的类中添加了注解，注解中保存了映射关系
	}
	 
}
